#ifndef _MEMORYMAP_H_
#define _MEMORYMAP_H_


extern Uint8	g_ImgCaptureBuf1[IMG_W*IMG_H];
extern Uint8	g_ImgCaptureBuf2[IMG_W*IMG_H];
extern Uint8	g_ImgCaptureBuf3[IMG_W*IMG_H];
extern Uint8	g_ImgCaptureBuf4[IMG_W*IMG_H];
extern Uint8	g_ui8YImageSrcAddr[IMG_W*IMG_H];
extern Uint8	g_ui8UImageSrcAddr[IMG_W*IMG_H/4];
extern Uint8	g_ui8VImageSrcAddr[IMG_W*IMG_H/4];
extern Uint8	g_ui8ImgProBuf[IMG_W*IMG_H];
extern Uint8 	g_ui8RxBuf[10];
extern Uint8 	g_ui8RxBuf2[400];
extern Uint8	g_ui8TxBuf[BUFLEN];
extern Uint8	g_ui8RS232ReceiveBuf[512];
extern Uint8	g_ui8RS485ReceiveBuf[512];
extern Uint8 	g_ui8UpdataBuf[0x400000];
extern Uint8 	g_ui8ImageStream0[1024*1024];
extern Uint8 	g_ui8ImageStream1[1024*1024];
extern Uint8	g_ui8CamerInfo_RxData[20];
extern Uint8	g_ui8CamerInfo_TxData[50];
extern Uint32 	g_ui32HistogramBufferA[258];
extern Uint32 	g_ui32HistogramBufferB[258];

#ifdef IDE3_3
extern SOCKET sd_acceptTRG;
extern SOCKET sd_acceptFCON;
extern SOCKET sd_acceptHFR;
extern SOCKET sd_acceptBoot;
extern SOCKET sd_accept;
#else
extern int sd_acceptTRG;
extern int sd_acceptFCON;
extern int sd_acceptHFR;
extern int sd_acceptBoot;
extern int sd_accept;
#endif

extern float g_fTemperature;
extern float g_fLUTGama;

extern Uint8 g_ui8LUTEnableFlg;
extern Uint8 g_ui8WDEnableFlg;
extern Uint8 g_ui8WBResult;
extern Uint8 g_ui8FlashSyncStatus;
extern Uint8 g_ui8TimeArray[8];
extern Uint8 g_ui8MACAddr[8];
extern Uint8 g_ui8ImgCaptureBuffChoose;
extern Uint8 g_ui8TrgModeProtocol;
extern Uint8 g_ui8WDTime_s;

extern Uint8 *	g_ui8ImageStream;

extern Uint32 g_ui32FrameNum;
extern Uint32 g_ui32HardwareVersion;
extern Uint32 g_ui32DSPFirmwareVersion;
extern Uint32 g_ui32SnapCount;
extern Uint32 g_ui32SnapInterval;
extern Uint32 g_ui32TrgShutterTime;
extern Uint32 g_ui32FconShutterTime;
extern Uint32 g_ui32HfrShutterTime;
extern Uint32 g_ui32MyIPAddr;
extern Uint32 g_ui32PioDirection;
extern Uint32 g_ui32PioOutvalue;
extern Uint32 g_ui32RS232Baudrate;
extern Uint32 g_ui32TransStreamLength;
extern Uint32 g_ui32ImgDstAddr;
extern Uint32 g_ui32TrgModeNetConnect;

extern volatile int g_intTxLen;
extern volatile int g_intRxLen;

extern volatile float g_fGain;

extern volatile Uint8 g_ui8NetCmd;
extern volatile Uint8 g_ui8RunFlg;
extern volatile Uint8 g_ui8RunMode;
extern volatile Uint8 g_ui8LastRunMode;
extern volatile Uint8 g_ui8ImageMode;
extern volatile Uint8 g_ui8TrgImgUpLoadReq;
extern volatile Uint8 g_ui8TrgCounter;
extern volatile Uint8 g_ui8WBEnable;
extern volatile Uint8 g_ui8SnapFinishedFlg;
extern volatile Uint8 g_ui8FModeENCComplete;
extern volatile Uint8 g_ui8FS_cur;
extern volatile Uint8 g_ui8FS_exp;
extern volatile Uint8 g_ui8TransferOver;
extern volatile Uint8 g_ui8HistogramEnable;
extern volatile Uint8 g_ui8HistogramBufChoose;
extern volatile Uint8 g_ui8HistogramBufARead;
extern volatile Uint8 g_ui8HistogramBufBRead;

extern volatile Uint32 g_ui32ImageSrcAddr;
extern volatile Uint32 g_ui32FrozenImageAddr;
extern volatile Uint32 g_ui32SnapFrameNum;
extern volatile Uint32 g_ui32DataLength;
extern volatile Uint32 g_ui32CmdDataLength;
extern volatile Uint32 g_ui32StreamPackNum;
extern volatile Uint32 g_ui32RestStream;


#endif //_MEMORYMAP_H_
